<template>
  <div class="powerpoint-window">
    <div class="window-header">
      <div class="window-title">
        <img src="@/assets/icons/powerpoint.svg" class="app-icon" />
        <span>演示文稿1 - PowerPoint</span>
      </div>
      <div class="window-buttons">
        <span class="minimize">─</span>
        <span class="maximize">□</span>
        <span class="close" @click="$router.push('/')">×</span>
      </div>
    </div>

    <div class="menu-bar">
      <span>文件</span>
      <span>开始</span>
      <span>插入</span>
      <span>设计</span>
      <span>切换</span>
      <span>动画</span>
      <span>放映</span>
      <span>视图</span>
      <span>帮助</span>
    </div>

    <div class="toolbar">
      <div class="tool-group">
        <button class="tool">
          <i class="fas fa-plus"></i>
          <span>新建幻灯片</span>
        </button>
        <button class="tool">
          <i class="fas fa-copy"></i>
          <span>复制幻灯片</span>
        </button>
      </div>

      <div class="tool-group">
        <button class="tool">
          <i class="fas fa-image"></i>
          <span>图片</span>
        </button>
        <button class="tool">
          <i class="fas fa-shapes"></i>
          <span>形状</span>
        </button>
        <button class="tool">
          <i class="fas fa-film"></i>
          <span>视频</span>
        </button>
      </div>

      <div class="tool-group">
        <button class="tool">
          <i class="fas fa-palette"></i>
          <span>主题</span>
        </button>
        <button class="tool">
          <i class="fas fa-magic"></i>
          <span>切换效果</span>
        </button>
      </div>

      <div class="tool-group">
        <button class="tool">
          <i class="fas fa-play"></i>
          <span>放映</span>
        </button>
        <button class="tool">
          <i class="fas fa-clock"></i>
          <span>计时</span>
        </button>
      </div>
    </div>

    <div class="content">
      <div class="slide-list">
        <div class="slide-thumbnail">幻灯片1</div>
        <div class="slide-thumbnail">幻灯片2</div>
      </div>
      <div class="slide-view">
        <div class="slide">
          <div class="placeholder">点击添加标题</div>
          <div class="placeholder">点击添加副标题</div>
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.powerpoint-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vh;
  background: white;
  border: 1px solid #999;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;

  .window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: #E9E9E9;
    border-bottom: 1px solid #DDD;
    
    .window-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      
      .app-icon {
        width: 16px;
        height: 16px;
      }
    }
    
    .window-buttons {
      display: flex;
      gap: 4px;
      
      span {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        
        &:hover {
          background: rgba(0, 0, 0, 0.1);
        }
      }
    }
  }

  .menu-bar {
    display: flex;
    gap: 16px;
    padding: 4px 8px;
    background: #F5F5F5;
    border-bottom: 1px solid #DDD;
    
    span {
      padding: 4px 8px;
      cursor: pointer;
      
      &:hover {
        background: #E5E5E5;
      }
    }
  }

  .toolbar {
    display: flex;
    gap: 16px;
    padding: 8px;
    background: #F5F5F5;
    border-bottom: 1px solid #DDD;
    
    .tool-group {
      display: flex;
      gap: 4px;
      padding-right: 16px;
      border-right: 1px solid #DDD;
      align-items: center;
      
      &:last-child {
        border-right: none;
      }
    }
    
    .tool {
      padding: 4px;
      background: none;
      border: none;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      font-size: 12px;
      
      &:hover {
        background: #E5E5E5;
      }
      
      i {
        font-size: 16px;
      }
    }
  }

  .content {
    flex: 1;
    display: flex;
    background: #F0F0F0;
    overflow: hidden;

    .slide-list {
      width: 200px;
      padding: 16px;
      background: #E5E5E5;
      border-right: 1px solid #DDD;
      overflow-y: auto;

      .slide-thumbnail {
        height: 112px;
        margin-bottom: 8px;
        background: white;
        border: 1px solid #DDD;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        cursor: pointer;

        &:hover {
          border-color: #0078D7;
        }
      }
    }

    .slide-view {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 40px;
      overflow: auto;

      .slide {
        width: 960px;
        height: 540px;
        background: white;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;

        .placeholder {
          padding: 20px;
          color: #666;
          cursor: text;

          &:hover {
            background: rgba(0, 120, 215, 0.1);
          }
        }
      }
    }
  }
}
</style> 